import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'take_photo_method_channel.dart';

abstract class TakePhotoPlatform extends PlatformInterface {
  /// Constructs a TakePhotoPlatform.
  TakePhotoPlatform() : super(token: _token);

  static final Object _token = Object();

  static TakePhotoPlatform _instance = MethodChannelTakePhoto();

  /// The default instance of [TakePhotoPlatform] to use.
  ///
  /// Defaults to [MethodChannelTakePhoto].
  static TakePhotoPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [TakePhotoPlatform] when
  /// they register themselves.
  static set instance(TakePhotoPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  // 拍照
  Future<String?> takePhoto() {
    throw UnimplementedError('takePhoto() has not been implemented.');
  }

  // 视频
  Future<String?> takeVideo() {
    throw UnimplementedError('openAlbum() has not been implemented.');
  }

  // 打开相机
  Future<void> openCamera() {
    throw UnimplementedError('openCamera() has not been implemented.');
  }
}
